package com.sxkiler.demo.test.common.config;

/**
 * 泛型的接口
 */
public interface BaseDbConfig {
    public String getName();
    public void setName(String name);
    public DBType getDBType();
    public boolean isValid();
    public enum DBType {
        MYSQL,
        ELASTICSEARCH,
        MONGODB;

        public boolean isEquals(String dbName){
            if(this.toString().equalsIgnoreCase(dbName)){
                return true;
            }else{
                return false;
            }
        }
    }
    public static boolean isDBType(String name,DBType dbType){
        return dbType.name().equalsIgnoreCase(name);
    }
}
